package com.minelx.animator.animators;

import java.util.ArrayList;
import java.util.List;

public class SimpleAnimatorBuilder extends AnimatorBuilder<SimpleAnimatorBuilder> {

	private final List<Runnable> updaters;

	public SimpleAnimatorBuilder() {
		updaters = new ArrayList<>();
	}

	@Override
	protected SimpleAnimatorBuilder self() {
		return this;
	}

	public SimpleAnimatorBuilder addUpdater(Runnable updater) {
		updaters.add(updater);
		return this;
	}

	@Override
	public SimpleAnimator build() {
		return new SimpleAnimator(listeners, updaters);
	}
}
